*******************************************************
* Lyle 05 Jan 11: 						              *
*	-this program serves as a base shell for all	  *
*	 stata do files					                  *
*******************************************************

********************************
* Standard Stata Configuration *
********************************
clear all
set mem 999m
capture log close
set logtype text
cap cd "C:\Users\ejm5\Google Drive\2015_Research\Unemployment_MILEX"
cap cd "C:\Users\Jordan.Becker\Desktop\GD\2015_Research\Unemployment_MILEX"
cap cd "\\usnatonetapp01.eur.state.sbu\profiles\beckerjm\Desktop\2015_Research\Unemployment_MILEX"
cap cd "C:\Users\jordan.becker\SkyDrive\2017_Research\Unemployment_MILEX"
log using "log\sgp_figure2_burdentimeseries.log", replace
set more off


********************
* Analyze the Data *
********************
#delimit;
use "dta\2017_uem", clear;
sort ccode year;
xtset ccode year;

*FIGURE 1: TIME SERIES TRANSATLANTIC BURDEN SHARING*
preserve;
drop if operating_share==.;
keep if year>=1985;
keep if countryname=="United States";
xtset usa_milex_burden year;
sort year;
sum usa_milex_burden;
xtset usa_operating_burden year;
sum usa_operating_burden;
generate us_mean=r(mean);
xtset europe_milex_burden year;
sort year;
sum europe_milex_burden;
xtset europe_operating_burden year;
sum europe_operating_burden;
generate euro_mean=r(mean);
twoway(tsline mil_share, lwidth(thick) lcolor(navy))
	  (tsline equipment_share, lwidth(thin) lcolor(green))
	  (tsline personnel_share, lwidth(thin) lcolor(black))
	  (tsline operating_share, lwidth(thin) lcolor(maroon))
	  (tsline infrastructure_share, lwidth(thin) lcolor(red)), scheme(sj)
	  xtitle("") xlab(1985(2)2015, labsize(tiny) angle(45)) ylab(30(5)85, 
	  labsize(small)) ytitle("U.S. Share of Total Transatlantic Expenditures(%), by Category", size(small) margin(medium))
	  legend(rows(2) size(tiny) label(1 MILEX)  label (2 Equipment) label(3 Personnel) label(4 O&M) label(5 Infrastructure));
graph save output\FigureTBD_CostShare.gph, replace;
sum mil_share equipment_share personnel_share operating_share infrastructure_share;
restore;


